<template>
	<view class="container">
		<view class="bcimg_con">
			<!-- 背景部分 -->
			<image class="img bc_img" :src="detailData.exhibitionImage" mode="widthFix"></image>
			<!-- 顶部信息容器 -->
			<view class="info_section_con">
				<view class="section_img_con"><image class="img" :src="detailData.exhibitionImage" mode="widthFix"></image></view>
				<!-- 文本容器 -->
				<view class="text_con">
					<view class="">
						<view class="item_title">{{detailData.exhibitionName}}</view>
						<view class="tags_group">
							<text class="tag_item" :class="'tag_item'+index" v-for="(item,index) in detailData.exhibitionLabels">{{item.exhibitionLabel}}</text>
							<!-- <text class="tag_item tag_item2">公交直达</text>
							<text class="tag_item tag_item3">无延期</text> -->
						</view>
					</view>
					<view class="price_group">
						<text class="current_price ">￥{{detailData.exhibitionPrice}}</text>
						
						<text class="original_price">￥{{detailData.exhibitionPriceScene}}</text>
					</view>
				</view>
			</view>
		</view>
		<!-- 主要信息容器 -->
		<view class="info_con">
			<view class="info_list">
				<view class="bc_con">
					<!-- 时间 -->
					<view class="time info_list_item">
						<view class="info_item_icon">
							<!-- mode图片宽高自适应 -->
							<image src="../../static/icon/detail/rlico@2x.png" mode="aspectFit"></image>
						</view>
						<text class="info_text">{{detailData.exhibitionStartTime}}～{{detailData.exhibitionEndTime}}</text>
					</view>
					<!-- 地点 -->
					<view class="location info_list_item">
						<view class="info_item_icon"><image src="../../static/icon/detail/addico@2x.png" mode="aspectFit"></image></view>
						<text class="info_text">{{detailData.exhibitionAddress}}</text>
					</view>
					<!-- 公告 -->
					<view class="notice_group">
						<view class="info_list_item notive_title">
							<view class="info_item_icon"><image src="../../static/icon/detail/mzico@2x.png" mode="aspectFit"></image></view>
							<text class="info_text">漫展公告</text>
						</view>
						<!-- 公告列表 -->
						<view class="notive_list">
							<view class="notive_list_item">
								<view class="item_title_group">
									<view class="notive_item_tag"></view>
									<text class="notive_item_title">重要提醒</text>
								</view>
								<view class="notive_item_content">{{detailData.exhibitionReminder}}</view>
							</view>
							<view class="notive_list_item">
								<view class="item_title_group">
									<view class="notive_item_tag"></view>
									<text class="notive_item_title">限购说明</text>
								</view>
								<view class="notive_item_content">{{detailData.exhibitionRestriction}}</view>
							</view>
							<view class="notive_list_item">
								<view class="item_title_group">
									<view class="notive_item_tag"></view>
									<text class="notive_item_title">退票说明</text>
								</view>
								<view class="notive_item_content">{{detailData.exhibitionRefundTicket}}</view>
							</view>
							<view class="notive_list_item">
								<view class="item_title_group">
									<view class="notive_item_tag"></view>
									<text class="notive_item_title">停售时间</text>
								</view>
								<view class="notive_item_content">{{detailData.exhibitionEndTime}}</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="bottom_pay_con">
			<button class="pay_btn" type="default" @click="confirmShare">立即购买</button>
		</view>
		
		<u-popup v-model="show" mode="bottom" border-radius="30" height="953" :closeable="true" >
			<pay-popup  :detailData="detailData" ></pay-popup>
			<!-- @select="select" -->
		</u-popup>
	</view>
</template>

<script>
// import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue';
// import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue';
import payPopup from '@/components/uni-popup/pay-popup.vue';


export default {
	data() {
		return {
			show: false,
			detailData:""
		};
	},
	components: {
		
		// uniPopupMessage,
		// uniPopupDialog,
		payPopup
	},
	methods: {
		confirmShare() {
			this.$hasToken()
			this.show=true
		},
		
		getExhibitionById(id){
			// this.$request("/comic-time/getExhibitionById",{exhibitionId:id}).then(res=>{
			// 	console.log(res)
			// })
			const ctx=this
			this.$request('/comic-time/getExhibitionById', {exhibitionId :id},'GET',).then(res=>{
				console.log(res.data)
				this.detailData=res.data
				// console.log(res.data)
			})
			
		}
	},
	onLoad(e) {
		// console.log(e)
		this.getExhibitionById(e.pid)
		// this.$request().then(res=>{})
	},
	computed:{
		
	}
};
</script>

<style lang="scss" scoped>
	.uni-page-head .uni-page-head-btn{
		display: flex;
		align-items: center;
	}
// img标签公共样式
.img {
	width: 100%;
	height: 100%;
}

// 总容器
.container {
	padding: 0;
	// position: relative;
	outline: 1px solid blue;

	// 头部信息容器
	.bcimg_con {
		position: relative;
		width: 100%;
		height: 480rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		overflow: hidden;
		.bc_img{
			filter:blur(20rpx);
			-webkit-filter:blur(20rpx);
			-moz-filter:blur(20rpx);
			-ms-filter:blur(20rpx);
			-o-filter:blur(20rpx);
		}
		&::before {
			position: absolute;
			content: '';
			width: 100%;
			height: 100%;
			background-color: rgba($color: #000000, $alpha: 0.5);
			z-index: 1;
		}

		.info_section_con {
			box-sizing: border-box;
			position: absolute;
			left: 0;
			bottom: 24rpx;
			width: 100%;
			height: 322rpx;
			background-color: transparent;
			padding: 25rpx 20rpx;
			z-index: 2;
			display: flex;
			align-items: center;

			.section_img_con {
				flex-shrink: 0;
				width: 200rpx;
				height: 267rpx;
				background-color: #9b9b9b;
				border-radius: 8rpx;
				overflow: hidden;
				margin-right: 20rpx;
				
			}

			.text_con {
				width: 100%;
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-between;

				.item_title {
					padding-top: 21rpx;
					line-height: 51rpx;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 2;
					/*显示行数*/
					overflow: hidden;
					font-family: 'PingFang SC Bold', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
					font-size: 34rpx;
					font-weight: bold;
					color: white;
					margin-bottom: 20rpx;
				}

				.tags_group {
					display: flex;
					justify-content: flex-start;
					align-items: center;

					.tag_item {
						margin-right: 10rpx;
						padding: 9rpx 12rpx;
						background-color: #999999;
						border-radius: 6rpx;
						font-family: PingFangSC;
						font-size: 22rpx;
						line-height: 33rpx;
						color: #ffffff;
						&.tag_item0{
							background-color: #feaf37;
						}
						&.tag_item1{
							background-color: #fe6563;
						}
						&.tag_item2{
							background-color: #e06fd5;
						}
						// #feaf37
						// #fe6563
						// #e06fd5
					}
				}

				.price_group {
					padding-bottom: 16rpx;
					display: flex;
					justify-content: flex-start;
					align-items: baseline;

					.current_price {
						font-family: PingFangSC-Semibold;
						font-size: 42rpx;
						font-weight: bold;
						color: #fd6666;
					}

					.original_price {
						font-family: PingFangSC-Regular;
						font-size: 26rpx;
						color: #dddddd;
					}
				}
			}
		}
	}

	// 头部信息结束

	// 主要信息列表
	.info_con {
		// height: 5000rpx;
		width: 100%;
		background-color: #FFFFFF;
		position: relative;

		// 信息列表
		.info_list {
			box-sizing: border-box;
			width: 100vw;
			
			overflow: hidden;
			border-radius: 30rpx 30rpx 0 0;
			position: absolute;
			left: 0;
			top: -30rpx;
			z-index: 10;
			.bc_con{
				background-color: #e2e2e2;
			}
			.info_list_item {
				&.time {
					margin-bottom: 2rpx;
				}

				&.location {
					margin-bottom: 10rpx;
				}

				background-color: #ffffff;
				padding: 0 20rpx;
				display: flex;
				justify-content: flex-start;
				align-items: center;

				.info_item_icon {
					width: 50rpx;
					height: 50rpx;
					margin-right: 15rpx;
					flex-shrink: 0;

					image {
						width: 100%;
						height: 100%;
					}
				}

				.info_text {
					padding: 26rpx 0;
					font-family: PingFangSC-Regular;
					font-size: 32rpx;
					line-height: 48rpx;
					color: #333333;
				}
			}

			// 公告列表
			.notice_group {
				width: 100%;

				.notive_title {
					font-family: PingFangSC-Semibold;
					font-size: 36rpx !important;
					font-weight: bold;
					// line-height: 33rpx;
					margin-bottom: 2rpx;
				}

				.notive_list {
					box-sizing: border-box;
					width: 100%;
					padding: 20rpx 20rpx 0 20rpx;
					background-color: #ffffff;
					margin-bottom: 108rpx;
					.notive_list_item {
						width: 100%;
						padding-bottom: 33rpx;

						// &:last-child{
						// 	margin-bottom: 0;
						// }
						.item_title_group {
							width: 100%;
							display: flex;
							align-items: center;
							justify-content: flex-start;
							margin-bottom: 10rpx;

							.notive_item_tag {
								width: 6rpx;
								height: 24rpx;
								margin-right: 10rpx;
								background-color: #fd6666;
								border-radius: 2rpx;
							}

							.notive_item_title {
								font-family: PingFangSC-Medium;
								font-size: 30rpx;
								font-weight: bold;
								line-height: 33rpx;
								color: #333333;
							}
						}

						.notive_item_content {
							margin-left: 16rpx;
							line-height: 42rpx;
							font-family: PingFangSC-Regular;
							font-size: 28rpx;
							color: #333333;
						}
					}
				}
			}
		}
	}

	// 底部按钮样式
	.bottom_pay_con {
		z-index: 100;
		width: 100%;
		height: 108rpx;
		position: fixed;
		left: 0;
		bottom: 0rpx;
		background-color: #ffffff;
		.pay_btn {
			width: 709rpx;
			background-color: #fd6666;
			border-radius: 44rpx;
			font-family: PingFangSC-Medium;
			font-size: 36rpx;
			font-weight: 500;
			line-height: 88rpx;
			letter-spacing: 0rpx;
			color: #ffffff;
		}
	}
}
</style>
